<!-- START:head -->
<!DOCTYPE html>
<html>
<head>
  <title>Pragprog Books Online Store</title>
     
  <%= javascript_include_tag "application" %>	 
  <%= stylesheet_link_tag    "application", media: "all" %>
  <%= csrf_meta_tags %>
  
												<%= yield :head %> <!-- (in your header)-->
  
 
</head>


<body class="<%= controller.controller_name %>">  						<!-- ???? interessante -->

	<div class="navbar navbar-fixed-top">
		<div class="navbar-inner">
			<div class="container">
				<a class="brand" href="/">STORE</a>		<!-- -->
					<ul class="nav">
		  
						<!-- <li class="active"><a href="/store">Home</a></li>	-->  <!-- -->
			
			<!-- -->
			<!-- <%= link_to 'Home', store_path %>  -->
			
<!-- Add following in application_controller.rb (OR application.rb)
<!-- TEMPLATE_URL = "www.google.com"-->
<!-- and you can access it any controller using -> puts TEMPLATE_URL # www.google.com -->
<!-- If you want to use the same variable in your any views/helpers/models you can use it following way -->
<!-- ApplicationController::TEMPLATE_URL -->


<!-- i18n -->

 <!--  link_to("Italian", "#{APP_CONFIG[:italian_website_url]}#{request.env['REQUEST_URI']}")  -->
 <!--  link_to("English", "#{APP_CONFIG[:english_website_url]}#{request.env['REQUEST_URI']}")   -->

<%= link_to("Italian", "it") %> 
<%= link_to("English", "en") %> 
<!-- assuming you would set APP_CONFIG[:deutsch_website_url] to some value like http://www.application.de. -->

			 <li> <%= link_to 'Logout', logout_path, method: :delete   %>  </li>
			

				<li><a href="pages/contact">Contact</a></li>
				<li> <%= link_to 'Log In', login_path %> </li>			 
				<li> <%= link_to 'Sign Up', signup_path %> </li>				 
				<li> <%= link_to 'Comments', comments_path %> </li>	
				

			
			<% if session[:user_id] %>			
				 <li> <%= link_to 'Cities', cities_path %> </li>
				<li> <%= link_to 'Orders', orders_path %> </li>
				<li> <%= link_to 'Products', products_path %> </li>
				<li> <%= link_to 'Comments', comments_path %> </li>
				<li> <%= link_to 'Users', users_path %> </li>
				<li> <%= link_to 'Line Items', line_items_path %> </li>
			 
			<% else%><% end %>
 
 	</ul>
	</div>
  </div>
</div>


	
	<!-- -->
	<div class="container">
		<% if session[:user_id] %>			
			<!-- LOG OUT button --> 
			 <%= button_to 'Logout', logout_path, method: :delete   %>  
		<% end %>			 
	</div>

	<!-- -->
	<div class="container">
		<% if @cart %>
			<%= hidden_div_if(@cart.line_items.empty?, id: 'cart') do %>
				<%= render @cart %>
			<% end %>
		<% end %>
	</div>
	
	<!-- -->	
	<div class="container">
		<%= yield %>
		 
	</div>

<!-- FOOTER -->	
<footer>
												<%= yield :scripts %> <!-- (in your footer)-->
    <!-- -->
	<div class="container">
		Copyright 2013
	</div>
</footer>
	
</body>
</html>
